-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BB-7106] Add new endpoint for cloning course #31794
[BB-7106] Add new endpoint for cloning course #31794
Conversation
Thanks for the pull request, @pkulkark! Please note that it may take us up to several weeks or months to complete a review and merge your PR. Feel free to add as much of the following information to the ticket as you can:
All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here. Please let us know once your PR is ready for our review and all tests are green. |
00b15a0
to
526557e
Compare
Is cloning a course the same as creating a "Re-Run Course" ? |
👍
|
@pdpinch "re-run course" uses the clone function underneath. The difference being the course ID would remain the same. Essentially it creates a new course with the same course ID and copies over the contents. The changes here expose the function as an api endpoint and allows you to create a new course (with different course ID) and copy over the contents without having to manually export and import it. |
Hi @pkulkark - just seeing if there's any update on this? |
@mphilbrick211 This is ready for review. Please let me know if you need any further information from me. |
Hi @jristau1984 - would you mind reviewing this and merging if all looks good? Thanks! |
@mphilbrick211 I do not have availability to review this for at least the next several weeks. |
Hi @pkulkark! While we wait for @jristau1984 for review, would you mind re-running the tests? We have a couple new ones that have popped up (shellcheck) that need to be run. Please let me know if you have any questions. Thanks! |
Friendly ping on this @pkulkark :) |
526557e
to
ec50632
Compare
@mphilbrick211 Sure, Done. |
Hi @openedx/teaching-and-learning! Is someone able to review/merge this for us? Thanks! |
Hi @pkulkark - looks like some additional tests have popped up! |
ec50632
to
59117e8
Compare
@mphilbrick211 Thanks for the ping. I rebased it to latest master and ran all the tests. |
Thanks, @pkulkark! @openedx/teaching-and-learning - just flagging that this is all set for review. Thanks! |
Thanks for the pull request, @pkulkark! Please note that it may take us up to several weeks or months to complete a review and merge your PR. Feel free to add as much of the following information to the ticket as you can:
All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here. Please let us know once your PR is ready for our review and all tests are green. |
59117e8
to
79c4b4a
Compare
@mphilbrick211 Sorry for the delay. I've rebased this now and all tests are green. |
@mphilbrick211 @jristau1984 The PR has been fixed and is ready for review. |
@mphilbrick211 @pkulkark I can review this PR as CC :) |
@farhaanbukhsh FYI, I've picked this ticket up from Pooja and am currently the assignee on the PR. Sure, please do review this when you have the time! |
Thank you, @farhaanbukhsh! |
@farhaanbukhsh Just checking if you're still planning to review the PR? |
@Cup0fCoffee Yes it's on my list :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have reviewed the code and read through it, this works great, Kudos on the work done here. I have a slight concern and improvement. We should probably add a docstring to the clone
method because if we don't we wouldn't know the difference between clone and rerun.
If we can add the documentation then we will know how to use it and when to use it and maybe substanciate with an example.
What do you say?
PS: @Cup0fCoffee your commit also has a typo can we correct that as well?
8953719
to
cc0d250
Compare
@farhaanbukhsh Thank you for your suggestions. I fixed the typo and added docstring for the |
@Cup0fCoffee can you rebase the branch please :) |
cc0d250
to
7567706
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
- ✅ I tested this on the devstack.
- ✅ I read through the code
- ❌ I checked for accessibility issues
- ✅ Includes documentation
- ❌ I made sure any change in configuration variables is reflected in the corresponding client's
configuration-secure
repository.
@pkulkark 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future. |
2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production. |
2U Release Notice: This PR has been deployed to the edX production environment. |
Co-authored-by: Maxim Beder <[email protected]>
Description
This PR add a new studio endpoint for the existing clone_course method, so that external applications can call it using the following API:
And passing the source_course_id (of an existing course) and destination_course_id (of a non-existing course) in the request data, like below:
Supporting information
OpenCraft Internal Jira ticket: BB-7106
Testing instructions
<your-studio-url>/api/v1/course_runs/clone/
, and pass the source_course_id and destination_course_id in the data params.